#include "Shm.hpp"
#include "NamedPipe.hpp"

int main()
{
	NamedPipe named_pipe(fifoname);
	named_pipe.OpenForWrite();

	SharedMemory shm(gpathname, gproj_id, USER, gdefaultsize);
	shm.VirtualAddr();
	shm.Size();
	char* mem = (char*)shm.VirtualAddr();
	//我们读写共享内存，并没有使用系统调用
	for(char c = 'A'; c <= 'Z'; c++)
	{
		mem[c-'A'] = c;
		sleep(1);

		//named_pipe.Write();
	}

	named_pipe.Close();
	return 0;
}